import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
    routes: [{
        path: '/',
        name: 'login',
        component: () =>
            import('../page/login.vue')
    }, {
        path: '/index',
        name: 'index',
        redirect: '/index/statistics', //重定向第一个子路由
        meta: { title: '首页' },
        component: () =>
            import('../page/index.vue'),
        children: [
            {
                path: '/index/statistics', //首页推荐
                name: 'statistics',
                meta: { title: '数据统计', showfater: true },
                component: () =>
                    import('../page/statistics/statistics.vue')
            },
            {
                path: '/index/souyeMsg', //首页推荐
                name: 'souyeMsg',
                meta: { title: '作品管理', showfater: true },
                component: () =>
                    import('../page/souyeMsg/souyeMsg.vue')
            },
            {
                path: '/index/seriesMsg', //系列管理
                name: 'seriesMsg',
                meta: { title: '系列管理', showfater: true },
                component: () =>
                    import('../page/seriesMsg/seriesMsg.vue')
            },
            {
                path: '/index/userMsg', //用户列表
                name: 'userMsg',
                meta: { title: '用户列表', showfater: true },
                component: () =>
                    import('../page/userMsg/userMsg.vue')
            }, {
                path: '/index/authorMsg', //商户列表
                name: 'authorMsg',
                meta: { title: '视频列表', showfater: true },
                component: () =>
                    import('../page/userMsg/authorMsg.vue')
            },
            {
                path: '/index/userMsg', //商户列表
                name: 'userMsg',
                meta: { title: '作者列表', showfater: true },
                component: () =>
                    import('../page/userMsg/userMsg.vue')
            },
            {
                path: '/index/userType', //商户列表
                name: 'userType',
                meta: { title: '收益统计', showfater: true },
                component: () =>
                    import('../page/userMsg/usertypeMsg.vue')
            },
            {
                path: '/index/userInfo',
                name: 'userInfo',
                meta: { title: '账户信息', showfater: true },
                component: () =>
                    import('../page/userInfo/userInfo.vue')
            }]
    }
    ]
})